package com.doodod.api.exception;

import com.doodod.api.model.base.ErrorCode;

/**
 * Created with IntelliJ IDEA.
 * User: ydw
 * Date: 15-4-28
 * Time: 下午4:10
 */
public class ApiException extends Exception {
    ErrorCode errorCode;
    public ApiException(int errcode, String des){
        super();
        errorCode = new ErrorCode();
        errorCode.setErrorCode(errcode);
        errorCode.setDescription(des);
    }

    public ErrorCode getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(ErrorCode errorCode) {
        this.errorCode = errorCode;
    }
}
